package com.omar.labs.tamtamy.XML;

import com.omar.labs.tamtamy.Notice;
import com.omar.labs.tamtamy.utils.XMLUtility;

public class XMLNotice extends Notice{
	
	public XMLNotice(String xml){
		super();
		this.id = Long.parseLong(XMLUtility.getNodeValue(xml, "id"));
		this.created = XMLUtility.getNodeValueWithAttribute(xml, "created", "class=\"sql-timestamp\"");
		this.userId = XMLUtility.getNodeValue(xml, "userId");
		this.notceType = XMLUtility.getNodeValue(xml, "noticeType");
		this.targetId = XMLUtility.getNodeValue(xml, "targetId");
	}

}
